<? $page_title='需求审批列表' ?>
<?include "FASHION/page_header.phtml"?>
<script language="JavaScript" src="<?php echo $root; ?>/util/datepicker/WdatePicker.js"></script>

<form method="post">
	单号：<input type="text" name="sno" value="<?= fetch_a_string('sno') ?>" size="12" />
        &nbsp; 部门：<?=	 htmlutil::dept_select('dept','') ?>
	&nbsp; 申请人：<?= htmlutil::users_select('user_id') ?>
	&nbsp; 审批状态：<?= Html::options2(array(
		'data'	=> array_combine(array(1,2,3), ReviewerHelper::flow2txt()),
		'name'	=> 'audit',
		'val'	=> fetch_a_int('audit'),
		'tips'	=> '',
	)) ?>
	&nbsp; 采购类型：<?= Html::options2(array(
		'data'	=> array(1=>'补库采购','专项采购','紧急采购'),
		'name'	=> 'type',
		'val'	=> fetch_a_int('type'),
		'tips'	=> '',
	)) ?>
	
	&nbsp; <input type="text" name="time" value="<? fetch_a_string('time') ?>" size="12"
         onfocus="WdatePicker({ maxDate:'<? date('Y-m-d') ?>' })" class="wdate" />
	&nbsp; <input type="submit" value="搜索" />
</form>

<table border="0" class="list"><tbody>
<tr class="nobg">
	<th>单号</th>
	<th>部门</th>
	<th>用户</th>
	<th>审批状态</th>
	<th>采购类型</th>
	<th width="60">总数量</th>
	<th width="100">时间</th>
	<th width="60">操作</th>
</tr>
<?foreach($list as $d){?>
<tr>
	<td><?$d.sno?></td>
	<td><?$d.dept_name?></td>
	<td><?$d.user_name?></td>
	<td class="state" <{if $d.r_pass==2}> style="color:red"<{/if}>><?= DemandHelper::flow2text($d.r_pass) ?></td>
	<td class="state"><?= DemandHelper::type2text($d.type) ?></td>
	<td><div class="decimal"><{$d.amount}></div></td>
	<td class="nowrap"><?=date('Y/m/d H:i', $d.addtime)?></td>
	<td>
		<a href="<?url("proc-view/id/".$d.id)?>" class="view" title="查看"></a>
		<a href="<?url("rever-flag/id/".$d.id.'/type/'.Reviewer::CLS_DEMAND)?>" class="flag" title="审批"></a>
	</td>
</tr>
<? } ?>
</tbody></table>

<? Html::pager($pager) ?>

<?include "FASHION/page_footer.phtml"?>
